<?php

$redis = new Redis();  
$redis->pconnect('127.0.0.1', 6379);  
$key = 'Job_add_msg';

while(1){  
    try{  
        $value = $redis->BLPOP($key, 20);  
        if(!empty($value)){  
            var_export( $value )."\n";  
        }  
    }catch(Exception $e){  
        echo $e->getMessage(). "\n";  
        exit;  
    }  
}  